package org.example.antbook.junit;
import junit.framework.TestCase;
public class PersonTest extends TestCase {
public void testFailure() throws Exception {
fail();
}
public void testPerson() {
Person p1 = new Person();
assertEquals("unknown name", p1.getName());
assertEquals(3, p1.getMaximumBooks());
}
public void testSetName() {
Person p2 = new Person();
p2.setName("Fred");
assertEquals("Fred", p2.getName());
}
public void testSetMaximumBooks() {
Person p3 = new Person();
p3.setMaximumBooks(10);
assertEquals(10, p3.getMaximumBooks());
}
}